-- card: 31120 from stack: in.5 -- bmap block id: 8059 -- flags: 0000 -- background id: 3858 -- name: CopyStruct ----- HyperTalk script ----- on hideObjects hide cd fld "Example Info" end hideObjects on showObjects show cd fld "Example Info" end showObjects -- part 1 (field) -- low flags: 01 -- high flags: 2000 -- rect: left=27 top=129 right=324 bottom=245 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 10 -- style flags: 0 -- line height: 13 -- part name: Example Info -- part contents for background part 20 ----- text ----- CopyStruct - A very strange XFCN that will probably be useful to a very select few. Syntax :CopyStruct(sourcePath, destPath, <"noDialog:"errorGlobal>) SOURCEPATH: the path to be copied from (can be a drive/folder/file) DESTPATH: the path to be copied to (can be a drive/folder/file) This XFCN copies the "look" of the drive/path in sourcePath onto the files/folders in destinationPath. Only files/folders with the same name have their structures copied. For folders: its window coordinates, view, scroll, color, location (on the desktop or in the window) are all duplicated. For files: the location, color, and comments are copied. If the paths specify drives/folders all files and folders within the paths are used. This XFCN is most useful when you wish to make one drive "look" identical (or almost identical) to another. We use it to make sure one version of our CD looks similar to past versions. It saves time since after use of copyStruct only new files/folders need to be moved around instead of the entire drive. We have used it successfully on drives as large as 600MB and 13,000 files. It is also great for those of us who are anal retentive about our desktops and spend hours getting windows to line up! Soon to come: a version to save this data into a file so that you can undo your considerate friend's damage to your orderly desktop. -- part contents for background part 38 ----- text ----- 7/50 -- part contents for card part 1 ----- text ----- In order to experiment with this XFCN, do the following: 1) Duplicate any folder on your drive 2) Open the copy and "mess things up" 3) Pass the full pathnames of these two folders to this XCMD 4) The files in the destination folder should be arranged in the same fashion as the source files